using System;
using System.Runtime.CompilerServices;
using ns16;
using ns20;

namespace Newtonsoft.Json.Serialization
{
	public class JsonContainerContract : JsonContract
	{
		private JsonContract jsonContract_0;

		private JsonContract jsonContract_1;

		[CompilerGenerated]
		private JsonConverter jsonConverter_2;

		[CompilerGenerated]
		private bool? nullable_1;

		[CompilerGenerated]
		private ReferenceLoopHandling? nullable_2;

		[CompilerGenerated]
		private TypeNameHandling? nullable_3;

		internal JsonContract JsonContract_0
		{
			get
			{
				return jsonContract_0;
			}
			set
			{
				jsonContract_0 = value;
				if (jsonContract_0 != null)
				{
					jsonContract_1 = (jsonContract_0.UnderlyingType.smethod_9() ? jsonContract_0 : null);
				}
				else
				{
					jsonContract_1 = null;
				}
			}
		}

		internal JsonContract JsonContract_1 => jsonContract_1;

		public JsonConverter ItemConverter
		{
			[CompilerGenerated]
			get
			{
				return jsonConverter_2;
			}
			[CompilerGenerated]
			set
			{
				jsonConverter_2 = value;
			}
		}

		public bool? ItemIsReference
		{
			[CompilerGenerated]
			get
			{
				return nullable_1;
			}
			[CompilerGenerated]
			set
			{
				nullable_1 = value;
			}
		}

		public ReferenceLoopHandling? ItemReferenceLoopHandling
		{
			[CompilerGenerated]
			get
			{
				return nullable_2;
			}
			[CompilerGenerated]
			set
			{
				nullable_2 = value;
			}
		}

		public TypeNameHandling? ItemTypeNameHandling
		{
			[CompilerGenerated]
			get
			{
				return nullable_3;
			}
			[CompilerGenerated]
			set
			{
				nullable_3 = value;
			}
		}

		internal JsonContainerContract(Type underlyingType)
			: base(underlyingType)
		{
			JsonContainerAttribute jsonContainerAttribute = Class140.smethod_0(underlyingType);
			if (jsonContainerAttribute != null)
			{
				if (jsonContainerAttribute.ItemConverterType != null)
				{
					ItemConverter = JsonConverterAttribute.smethod_0(jsonContainerAttribute.ItemConverterType);
				}
				ItemIsReference = jsonContainerAttribute.nullable_1;
				ItemReferenceLoopHandling = jsonContainerAttribute.nullable_2;
				ItemTypeNameHandling = jsonContainerAttribute.nullable_3;
			}
		}
	}
}
